//== GAIA ============================================================================

//== BEGINNING OF CODE ===============================================================

#include "sagittarius/core/SagittariusCore.h"

#include <iostream>

using namespace std;

int get_const_value() {
    return 4;
}

void a_fun(const int const_val) {
    //do something that relies on const_val having
    //a certain expected value
    assert(const_val == 4);
}

//#define TEST_RVALUE_ASSIGN

int main(int argc, char* argv[])
{
    //BUG: I intentionally tried to assign an rvalue, should
    //not compile
#ifdef TEST_RVALUE_ASSIGN
    if(get_const_value() = 4)
        cout << "get_const_value returned 4\n";
    else
        cout << "get_const_value did not return 4\n";
#endif
    //Note that there are still reasons to make the return type
    //of get_const_value a const int.
    //For example, consider the following:
    a_fun(get_const_value()+1);
    
    return 0;
}
